import os
from dotenv import load_dotenv

# 导入 LangChain 的 ChatOpenAI 类
from langchain_openai import ChatOpenAI

model = ChatOpenAI(
    model="deepseek-chat",
    openai_api_key=os.getenv("DEEPSEEK_API_KEY"),
    openai_api_base=os.getenv("DEEPSEEK_API_BASE")
)

prompt = "你好，你是谁？"
response = model.invoke(prompt) #invoke方法发送消息
print(response.content)




